package com.googlecode.activitiportal.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
 
@Entity
@Table(name="BPM_USER_INFO")
public class UserInfo {
 
    private Long id;
    private String userName;
    private Partner partner;
    private String phone1;
    private String phone2;
 
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    public Long getId() {	
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    @Column(name="USER_NAME")
		public String getUserName() {
    	return userName;
    }

		public void setUserName(String userName) {
    	this.userName = userName;
    }

		@Column(name="PHONE1")
		public String getPhone1() {
    	return phone1;
    }

		public void setPhone1(String phone1) {
    	this.phone1 = phone1;
    }

		@Column(name="PHONE2")
		public String getPhone2() {
    	return phone2;
    }

		public void setPhone2(String phone2) {
    	this.phone2 = phone2;
    }

		@ManyToOne(fetch=FetchType.EAGER)
		@JoinColumn(name="PARTNER_ID")
		public Partner getPartner() {
    	return partner;
    }

		public void setPartner(Partner partner) {
    	this.partner = partner;
    }
		
    @Override
    public String toString() {
        StringBuffer strBuff = new StringBuffer();
        strBuff.append("id : ").append(getId());
        return strBuff.toString();
    }
}